import axios from "axios";

 export default class Http {
  constructor() {
    this.$axios = axios;
    // axios.defaults.baseURL = "https://api.iynn.cn/film/api/v1";
    // 响应拦截器
    axios.interceptors.response.use(
      (response) => {
        return response.data || response;
      },
      (error) => {
        return Promise.reject(error);
      }
    )
  }
  get(url){
    return axios.get(url)
  }
  post(url, data = {}){
    return axios.post(url, data)
  }
}

// export default axios
